package com.wgt.observer;

/**
 * 名为Hexa的观察者
 * Created by wgt on 2017/6/14.
 */
public class HexaObserver extends Observer {
    public HexaObserver(Subject subject) {
        this.subject = subject;
        subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "Hexa String: "
                + Integer.toBinaryString( subject.getStatus() ) );
    }
}
